package com.rchat.pocmini.activity.chatmessage;

import android.content.Context;
import android.view.MotionEvent;
import android.widget.AbsListView;

import com.airtalkee.sdk.entity.AirMessage;
import com.rchat.pocmini.common.mvp.BaseModel;
import com.rchat.pocmini.common.mvp.BasePresenter;
import com.rchat.pocmini.common.mvp.BaseView;
import com.rchat.pocmini.message.PocAirtalkeeMessage;

import java.util.List;

/**
 * Created by ljd on 2017/9/28.
 */

public interface ChatMessageContract {

    interface  View extends BaseView {
        void showMessage(List<AirMessage> list);
        void setMessageListSelection(int Selection,boolean selected);
        void showMessage(AirMessage airMessage);
        void showRecordingView(int paramInt, Object paramObject);
        void removeMessage();
        void setRecordPlaying(AirMessage currentAirMsg);
        void backPressed(AirMessage currentAirMsg,PocAirtalkeeMessage pocAirtalkeeMessage);
    }

    abstract class Presenter extends BasePresenter<ChatMessageContract.View, ChatMessageContract.Model> {
        abstract void loadFirstPageData(String groupId);
        abstract void messageListScroll(String groupId,AbsListView view, int scrollState);
        abstract void messageSend(String groupId, String content);
        abstract void speakBtnTouch(String groupId, android.view.View v, MotionEvent event);
        abstract void soundMessagePlay(android.view.View v);
        abstract void backPressed(String content);
    }

    interface Model extends BaseModel {
        List<AirMessage> loadFirstPageData(Context context, String groupId, int currentPage, int lineSize);
        int getAllMessagesCount(Context context,String groupId);
        List<AirMessage> loadMessageInfos(Context context, String groupId, int currentPage, int lineSize);
    }

}
